package com.doit.day07

/**
 * >:
 * <:
 */
object _09_泛型的上界和下界 {
  def main(args: Array[String]): Unit = {

    def sayHi[T >: Fu](t:T)={
      println("hello")
    }

//    sayHi[Ye](new Ye)
//    sayHi[Fu](new Fu)

    sayHi[Fu](new Zi)
    sayHi[Ye]
    sayHi[TiYe]
//    sayHi[Zi]
//    sayHi[Sun]



  }
}

class TiYe()
class Ye() extends TiYe()
class Fu() extends Ye()
class Zi() extends Fu()
class Sun() extends Zi()
